home *** CD-ROM | disk | FTP | other *** search
/ MacFormat España 14 / MacFormat n. 14 (Spain) / MacFormat 14.bin / C de cerca / Codewarrior Lite / MacOS Support / Headers / Universal Headers / GXPrinterDrivers.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-06  |  39.9 KB  |  932 lines

  1. /*
  2.      File:        GXPrinterDrivers.h
  3.  
  4.      Contains:    This file defines data types and API functions for printer driver development.
  5.  
  6.      Version:    Technology:    Quickdraw GX 1.1
  7.                  Package:    Universal Interfaces 2.1 in “MPW Latest” on ETO #18
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. */
  19.  
  20. #ifndef __GXPRINTERDRIVERS__
  21. #define __GXPRINTERDRIVERS__
  22.  
  23.  
  24. #ifndef __SCALERTYPES__
  25. #include <ScalerTypes.h>
  26. #endif
  27. /*    #include <Types.h>                                            */
  28. /*        #include <ConditionalMacros.h>                            */
  29. /*    #include <MixedMode.h>                                        */
  30. /*    #include <GXMath.h>                                            */
  31. /*        #include <FixMath.h>                                    */
  32. /*    #include <SFNTTypes.h>                                        */
  33. /*        #include <GXTypes.h>                                    */
  34.  
  35. #ifndef __PRINTING__
  36. #include <Printing.h>
  37. #endif
  38. /*    #include <Errors.h>                                            */
  39. /*    #include <Quickdraw.h>                                        */
  40. /*        #include <QuickdrawText.h>                                */
  41. /*    #include <Dialogs.h>                                        */
  42. /*        #include <Memory.h>                                        */
  43. /*        #include <Menus.h>                                        */
  44. /*        #include <Controls.h>                                    */
  45. /*        #include <Windows.h>                                    */
  46. /*            #include <Events.h>                                    */
  47. /*                #include <OSUtils.h>                            */
  48. /*        #include <TextEdit.h>                                    */
  49.  
  50. #ifndef __GXPRINTING__
  51. #include <GXPrinting.h>
  52. #endif
  53. /*    #include <Collections.h>                                    */
  54. /*    #include <Files.h>                                            */
  55. /*        #include <Finder.h>                                        */
  56. /*    #include <GXFonts.h>                                        */
  57. /*    #include <Lists.h>                                            */
  58. /*    #include <GXMessages.h>                                        */
  59.  
  60. #ifdef __cplusplus
  61. extern "C" {
  62. #endif
  63.  
  64. #if PRAGMA_ALIGN_SUPPORTED
  65. #pragma options align=mac68k
  66. #endif
  67.  
  68. #if PRAGMA_IMPORT_SUPPORTED
  69. #pragma import on
  70. #endif
  71.  
  72. struct gxManualFeedAlertPrefs {
  73.     long                            alertFlags;                    /*    Flags--first word is for driver's private use, the rest is predefined. */
  74. };
  75. typedef struct gxManualFeedAlertPrefs gxManualFeedAlertPrefs, *gxManualFeedAlertPrefsPtr, **gxManualFeedAlertPrefsHdl;
  76.  
  77. /* Constants for the alertFlags field of gxManualFeedAlertPrefs.*/
  78.  
  79. enum {
  80.     gxShowAlerts                = 0x00000001,                    /* Show alerts for this desktop printer. */
  81.     gxAlertOnPaperChange        = 0x00000002                    /* …only if the papertype changes. */
  82. };
  83.  
  84. enum {
  85.     gxDefaultMFeedAlertSettings    = (gxShowAlerts | gxAlertOnPaperChange)
  86. };
  87.  
  88. /* Driver output settings structure for desktop printer gxDriverOutputType resource */
  89. struct gxDriverOutputSettings {
  90.     long                            driverflags;                /*    Flags -- for use by driver. */
  91.     long                            outputSettings;                /*    Flags -- predefined. */
  92. };
  93. typedef struct gxDriverOutputSettings gxDriverOutputSettings, *gxDriverOutputSettingsPtr, **gxDriverOutputSettingsHdl;
  94.  
  95. /* Constants for the outputSettings field of gxDriverOutputSettings. */
  96.  
  97. enum {
  98.     gxCanConfigureTrays            = 0x00000001                    /* Desktop printer represents a device with a paper feed. */
  99. };
  100.  
  101. /* ------------------------------------------------------------------------------
  102.  
  103.                         Printing Driver Constants and Types
  104.  
  105. -------------------------------------------------------------------------------- */
  106. enum {
  107.     gxInputTraysMenuItem        = -1                            /* Menu item number for "Input Trays..." */
  108. };
  109.  
  110. /* Buffering and IO preferences-- this structure mirrors the 'iobm' resource */
  111. struct gxIOPrefsRec {
  112.     unsigned long                    communicationsOptions;        /* Standard or nonstandard I/O? */
  113.     unsigned long                    numBuffers;                    /* Requested number of buffers for QDGX to create */
  114.     unsigned long                    bufferSize;                    /* The size of each buffer */
  115.     unsigned long                    numReqBlocks;                /* The number of async I/O request blocks which will be needed */
  116.     unsigned long                    openCloseTimeout;            /* The open/close timeout (in ticks) */
  117.     unsigned long                    readWriteTimeout;            /* The read/write timeout (in ticks) */
  118. };
  119. typedef struct gxIOPrefsRec gxIOPrefsRec, *gxIOPrefsPtr, **gxIOPrefsHdl;
  120.  
  121. /* Constants for the communicationsOptions field of IOPrefsRec. */
  122.  
  123. enum {
  124.     gxUseCustomIO                = 0x00000001                    /* Driver uses a non-standard IO mechanism */
  125. };
  126.  
  127. /* Information about writing to a file */
  128. struct gxPrintDestinationRec {
  129.     Boolean                            printToFile;                /* True if output is to go to a file */
  130.     char                            padByte;
  131.     FSSpec                            fSpec;                        /* If going to a file, the FSSpec for the file */
  132.     char                            includeFonts;                /* True if fonts are to be included */
  133.     Str31                            fileFormat;                    /* Format to write file */
  134. };
  135. typedef struct gxPrintDestinationRec gxPrintDestinationRec, *gxPrintDestinationPtr, **gxPrintDestinationHdl;
  136.  
  137. /* This structure is the content of each cell in the standard PACK LDEF */
  138. struct gxPortListRec {
  139.     char                            firstMarker;                /* Markers to indicate icon or non-icon version */
  140.     char                            secondMarker;                /* if these are ≈ and ≈, then the cell is an icon cell. */
  141. /* Otherwise, it is assumed to be a standard text LDEF */
  142. /* cell */
  143.     Handle                            iconSuiteHandle;            /* The icon suite to draw for this cell */
  144.     Handle                            outputDriverName;            /* Handle to the output driver name (for serial) */
  145.     Handle                            inputDriverName;            /* Handle to the input driver name (for serial) */
  146.     Str255                            iconName;                    /* Name to draw under the icon */
  147. };
  148. typedef struct gxPortListRec gxPortListRec, *gxPortListPtr;
  149.  
  150. /* ------------------------------------------------------------------------------
  151.  
  152.                         Printing Driver Constants for resources in the desktop printer
  153.  
  154. -------------------------------------------------------------------------------- */
  155.  
  156. enum {
  157.     gxDeviceCommunicationsID    = 0
  158. };
  159.  
  160. /* ----------------------------------• 'prod' •---------------------------------- */
  161. /*
  162.       For PostScript devices, the device and version names of the device.
  163.       (0) product name is of type PString
  164.       (1) version is of type PString
  165.       (2) revision is of type PString
  166.       (3) vm available is of type long
  167.       (4) font stream type is of type scalerStreamTypeFlag
  168.       (5) language level is of type long
  169. */
  170. enum {
  171.     gxPostscriptProductInfoType    = 'prod',
  172.     gxPostscriptProductNameID    = 0,
  173.     gxPostscriptVersionID        = 1,
  174.     gxPostscriptRevisionID        = 2,
  175.     gxPostscriptVMAvailableID    = 3,
  176.     gxPostscriptFontStreamTypeID = 4,
  177.     gxPostscriptLanguageLevelID    = 5
  178. };
  179.  
  180. /* ------------------------------------------------------------------------------
  181.  
  182.                         Printing Driver Constants for status alerts
  183.  
  184. -------------------------------------------------------------------------------- */
  185. /* Structure passed in statusBuffer of StatusRecord for manual feed alert */
  186. struct gxManualFeedRecord {
  187.     Boolean                            canAutoFeed;                /* True if driver can switch to auto feed */
  188.     Str31                            paperTypeName;                /* Name of paperType to feed manually */
  189. };
  190. typedef struct gxManualFeedRecord gxManualFeedRecord;
  191.  
  192. /* Structure passed in statusBuffer of StatusRecord for out of paper alert */
  193. struct gxOutOfPaperRecord {
  194.     Str31                            paperTypeName;                /* Name of printing document */
  195. };
  196. typedef struct gxOutOfPaperRecord gxOutOfPaperRecord;
  197.  
  198. /* The DITL id for the auto feed button in the manual feed alert */
  199.  
  200. enum {
  201.     gxAutoFeedButtonId            = 3
  202. };
  203.  
  204. /* Status resource id for the alerts */
  205. enum {
  206.     gxUnivAlertStatusResourceId    = -28508
  207. };
  208.  
  209. /* Status resource indices for alerts */
  210. enum {
  211.     gxUnivManualFeedIndex        = 2,
  212.     gxUnivFailToPrintIndex        = 3,
  213.     gxUnivPaperJamIndex            = 4,
  214.     gxUnivOutOfPaperIndex        = 5,
  215.     gxUnivNoPaperTrayIndex        = 6,
  216.     gxUnivPrinterReadyIndex        = 7,
  217.     gxUnivAlertBeforeIndex        = 9,
  218.     gxUnivAlertAfterIndex        = 10
  219. };
  220.  
  221. /* Allocation sizes for status buffers needed for automatic alerts */
  222. enum {
  223.     gxDefaultStatusBufferSize    = 10,
  224.     gxManualFeedStatusBufferSize = 34,
  225.     gxOutOfPaperStatusBufferSize = 42
  226. };
  227.  
  228. /* ------------------------------------------------------------------------------
  229.  
  230.                                 Old Application Support
  231.  
  232. -------------------------------------------------------------------------------- */
  233. /* The format of a 'cust' resource  */
  234. struct gxCustomizationRec {
  235.     short                            horizontalResolution;        /* Horizontal res (integral part) */
  236.     short                            verticalResolution;            /* Vertical res (integral part) */
  237.     short                            upDriverType;                /* "upDriver" emulation type */
  238.     Point                            patternStretch;                /* Pattern stretch factor */
  239.     short                            translatorSettings;            /* Translator settings to use */
  240. };
  241. typedef struct gxCustomizationRec gxCustomizationRec, *gxCustomizationPtr, **gxCustomizationHdl;
  242.  
  243. /* The format of a 'resl' resource */
  244. struct gxResolutionRec {
  245.     short                            rangeType;                    /* Always 1 */
  246.     short                            xMinimumResolution;            /* Min X resolution available */
  247.     short                            xMaximumResolution;            /* Max X resolution available */
  248.     short                            yMinimumResolution;            /* Min Y resolution available */
  249.     short                            yMaximumResolution;            /* Max Y resolution available */
  250.     short                            resolutionCount;            /* Number of resolutions */
  251.     Point                            resolutions[1];                /* Array of resolutions */
  252. };
  253. typedef struct gxResolutionRec gxResolutionRec, *gxResolutionPtr, **gxResolutionHdl;
  254.  
  255. /*
  256.  
  257.         Constants for the "universal" print record.
  258.  
  259. */
  260. /* Constant for version number in universal print record */
  261.  
  262. enum {
  263.     gxPrintRecordVersion        = 8
  264. };
  265.  
  266. /* Constants for feed field in universal print record */
  267. enum {
  268.     gxAutoFeed                    = 0,
  269.     gxManualFeed                = 1
  270. };
  271.  
  272. /* Constants for options field in universal print record */
  273. enum {
  274.     gxPreciseBitmap                = 0x0001,                        /* Tall adjusted (IW), precise bitmap (LW, SC) */
  275.     gxBiggerPages                = 0x0002,                        /* No gaps (IW), larger print area (LW) */
  276.     gxGraphicSmoothing            = 0x0004,                        /* Graphic smoothing (LW) */
  277.     gxTextSmoothing                = 0x0008,                        /* Text smoothing (SC) */
  278.     gxFontSubstitution            = 0x0010,                        /* Font substitution */
  279.     gxInvertPage                = 0x0020,                        /* B/W invert image */
  280.     gxFlipPageHoriz                = 0x0040,                        /* Flip horizontal */
  281.     gxFlipPageVert                = 0x0080,                        /* Flip vertical */
  282.     gxColorMode                    = 0x0100,                        /* Color printing */
  283.     gxBidirectional                = 0x0200,                        /* Bidirectional printing */
  284.     gxUserFlag0                    = 0x0400,                        /* User flag 0 */
  285.     gxUserFlag1                    = 0x0800,                        /* User flag 1 */
  286.     gxUserFlag2                    = 0x1000,                        /* User flag 2 */
  287.     gxReservedFlag0                = 0x2000,                        /* Reserved flag 0 */
  288.     gxReservedFlag1                = 0x4000,                        /* Reserved flag 1 */
  289.     gxReservedFlag2                = 0x8000                        /* Reserved flag 2 */
  290. };
  291.  
  292. /* Constants for orientation field in universal print record */
  293. enum {
  294.     gxPortraitOrientation        = 0,
  295.     gxLandscapeOrientation        = 1,
  296.     gxAltPortraitOrientation    = 2,
  297.     gxAltLandscapeOrientation    = 3
  298. };
  299.  
  300. /* Constants for qualityMode field in universal print record */
  301. enum {
  302.     gxBestQuality                = 0,
  303.     gxFasterQuality                = 1,
  304.     gxDraftQuality                = 2
  305. };
  306.  
  307. /* Constants for firstTray and remainingTray fields in universal print record */
  308. enum {
  309.     gxFirstTray                    = 0,
  310.     gxSecondTray                = 1,
  311.     gxThirdTray                    = 2
  312. };
  313.  
  314. /* Constants for coverPage field in universal print record */
  315. enum {
  316.     gxNoCoverPage                = 0,
  317.     gxFirstPageCover            = 1,
  318.     gxLastPageCover                = 2
  319. };
  320.  
  321. /* Constants for headMotion field in universal print record */
  322. enum {
  323.     gxUnidirectionalMotion        = 0,
  324.     gxBidirectionalMotion        = 1
  325. };
  326.  
  327. /* Constants for saveFile field in universal print record */
  328. enum {
  329.     gxNoFile                    = 0,
  330.     gxPostScriptFile            = 1
  331. };
  332.  
  333. /* The format of the "universal" print record */
  334. struct gxUniversalPrintRecord {
  335.     short                            prVersion;                    /* Print record version */
  336. /*
  337.                                                         prInfo subrecord
  338.                                                 */
  339.     short                            appDev;                        /* Device kind, always 0 */
  340.     short                            appVRes;                    /* Application vertical resolution */
  341.     short                            appHRes;                    /* Application horizontal resolution */
  342.     Rect                            appPage;                    /* Page size, in application resolution */
  343.     Rect                            appPaper;                    /* Paper rectangle [offset from rPage] */
  344. /*
  345.                                                         prStl subrecord
  346.                                                 */
  347.     short                            devType;                    /* Device type, always 0xA900 (was wDev) */
  348.     short                            pageV;                        /* Page height in 120ths of an inch */
  349.     short                            pageH;                        /* Page width in 120ths of an inch */
  350.     char                            fillByte;                    /* Page calculation mode */
  351.     char                            feed;                        /* Feed mode */
  352. /*
  353.                                                         prInfoPT subrecord
  354.                                                 */
  355.     short                            devKind;                    /* Device kind, always 0 */
  356.     short                            devVRes;                    /* Device vertical resolution */
  357.     short                            devHRes;                    /* Device horizontal resolution */
  358.     Rect                            devPage;                    /* Device page size */
  359. /*
  360.                                                         prXInfo subrecord
  361.                                                 */
  362.     short                            actualCopies;                /* Actual number of copies for this job */
  363.     short                            options;                    /* Options for this device */
  364.     short                            reduction;                    /* Reduce/enlarge factor */
  365.     char                            orientation;                /* Orientation of paper ( 0=portrait, 1=landscape ) */
  366. /*
  367.                                                         Clusters and PopUps
  368.                                                 */
  369.     char                            qualityMode;                /* Quality mode */
  370.     char                            coverPage;                    /* Cover page */
  371.     char                            firstTray;                    /* First feed tray */
  372.     char                            remainingTray;                /* Remaining feed tray */
  373.     char                            headMotion;                    /* Head motion */
  374.     char                            saveFile;                    /* Save file */
  375.     char                            userCluster1;                /* Three clusters left over */
  376.     char                            userCluster2;
  377.     char                            userCluster3;
  378. /*
  379.                                                         prJob subrecord
  380.                                                 */
  381.     short                            firstPage;                    /* First page */
  382.     short                            lastPage;                    /* Last page */
  383.     short                            copies;                        /* Number of copies, always 1 */
  384.     char                            reserved1;                    /* Always true, unused */
  385.     char                            reserved2;                    /* Always true, unused */
  386.     PrIdleUPP                        pIdleProc;                    /* Idle proc */
  387.     Ptr                                pFileName;                    /* Spool file name pointer */
  388.     short                            fileVol;                    /* Spool file vRefNum */
  389.     char                            fileVers;                    /* File version, must be 0 */
  390.     char                            reserved3;                    /* Always 0 */
  391.     short                            printX[19];                    /* Internal use */
  392. };
  393. typedef struct gxUniversalPrintRecord gxUniversalPrintRecord, *gxUniversalPrintRecordPtr, **gxUniversalPrintRecordHdl;
  394.  
  395. /* ------------------------------------------------------------------------------
  396.  
  397.                             Compatibility Printing Messages
  398.  
  399. -------------------------------------------------------------------------------- */
  400. extern OSErr Forward_GXPrOpenDoc(THPrint hPrint, TPPrPort *pPort)
  401.  TWOWORDINLINE(0x7036, 0xABFB);
  402. extern OSErr Forward_GXPrCloseDoc(TPPrPort pPort)
  403.  TWOWORDINLINE(0x7036, 0xABFB);
  404. extern OSErr Forward_GXPrOpenPage(TPPrPort pPort, TPRect pRect, Point resolution)
  405.  TWOWORDINLINE(0x7036, 0xABFB);
  406. extern OSErr Forward_GXPrClosePage(TPPrPort pPort)
  407.  TWOWORDINLINE(0x7036, 0xABFB);
  408. extern OSErr Forward_GXPrintDefault(THPrint hPrint)
  409.  TWOWORDINLINE(0x7036, 0xABFB);
  410. extern OSErr Forward_GXPrStlDialog(THPrint hPrint, Boolean *confirmed)
  411.  TWOWORDINLINE(0x7036, 0xABFB);
  412. extern OSErr Forward_GXPrJobDialog(THPrint hPrint, Boolean *confirmed)
  413.  TWOWORDINLINE(0x7036, 0xABFB);
  414. extern OSErr Forward_GXPrStlInit(THPrint hPrint, TPPrDlgRef *pDlg)
  415.  TWOWORDINLINE(0x7036, 0xABFB);
  416. extern OSErr Forward_GXPrJobInit(THPrint hPrint, TPPrDlgRef *pDlg)
  417.  TWOWORDINLINE(0x7036, 0xABFB);
  418. extern OSErr Forward_GXPrDlgMain(THPrint hPrint, PDlgInitUPP initProc, Boolean *confirmed)
  419.  TWOWORDINLINE(0x7036, 0xABFB);
  420. extern OSErr Forward_GXPrValidate(THPrint hPrint, Boolean *changedPrintRecord)
  421.  TWOWORDINLINE(0x7036, 0xABFB);
  422. extern OSErr Forward_GXPrJobMerge(THPrint srcPrint, THPrint destPrint)
  423.  TWOWORDINLINE(0x7036, 0xABFB);
  424. extern OSErr Forward_GXPrGeneral(Ptr dataPtr)
  425.  TWOWORDINLINE(0x7036, 0xABFB);
  426. extern OSErr Forward_GXConvertPrintRecordTo(THPrint hPrint)
  427.  TWOWORDINLINE(0x7036, 0xABFB);
  428. extern OSErr Forward_GXConvertPrintRecordFrom(THPrint hPrint)
  429.  TWOWORDINLINE(0x7036, 0xABFB);
  430. extern OSErr Forward_GXPrintRecordToJob(THPrint hPrint, gxJob aJob)
  431.  TWOWORDINLINE(0x7036, 0xABFB);
  432. /* ------------------------------------------------------------------------------
  433.  
  434.                         Raster Driver Contants and Types
  435.  
  436. -------------------------------------------------------------------------------- */
  437. typedef long gxRasterPlaneOptions;
  438.  
  439. /* Input structure for setting up the offscreen */
  440. struct gxPlaneSetupRec {
  441.     gxRasterPlaneOptions            planeOptions;                /* Options for the offscreen package */
  442.     gxHalftone                        planeHalftone;                /* OPTIONAL: halftone structure for this plane */
  443.     gxColorSpace                    planeSpace;                    /* OPTIONAL: noSpace will get the graphics default */
  444.     gxColorSet                        planeSet;                    /* OPTIONAL: NIL gets the default */
  445.     gxColorProfile                    planeProfile;                /* OPTIONAL: NIL gets no matching */
  446. };
  447. typedef struct gxPlaneSetupRec gxPlaneSetupRec;
  448.  
  449. /* Constants for planeOptions field in gxPlaneSetupRec */
  450.  
  451. enum {
  452.     gxDefaultOffscreen            = 0x00000000,                    /* Default value - bits are allocated for the client, halftoning takes place */
  453.     gxDontSetHalftone            = 0x00000001,                    /* Don't call SetViewPortHalftone */
  454.     gxDotTypeIsDitherLevel        = 0x00000002                    /* Call SetViewPortDither using the dotType as the level */
  455. };
  456.  
  457. struct gxOffscreenSetupRec {
  458.     short                            width;                        /* Width in pixels */
  459.     short                            minHeight;                    /* Minimum height in pixels - actual height returned here */
  460.     short                            maxHeight;                    /* Maximum height in pixels */
  461.     Fixed                            ramPercentage;                /* Maximum percentage of RAM to take */
  462.     long                            ramSlop;                    /* Amount of RAM to be sure to leave */
  463.     short                            depth;                        /* Depths in bits of each plane */
  464.     gxMapping                        vpMapping;                    /* Mapping to assign to offscreen viewPorts */
  465.     gxMapping                        vdMapping;                    /* Mapping to assign to offscreen viewDevices */
  466.     short                            planes;                        /* Number of planes to allocate of depth bits each (can be more than 4) */
  467.     gxPlaneSetupRec                    planeSetup[4];                /* Parameters for each plane, 4 is provided because it is most handy for writers of devices */
  468. };
  469. typedef struct gxOffscreenSetupRec gxOffscreenSetupRec;
  470.  
  471. /* The format of one plane in the offscreen planar area */
  472. struct gxOffscreenPlaneRec {
  473.     gxViewPort                        theViewPort;                /* viewPort for the offscreen */
  474.     gxViewDevice                    theDevice;                    /* viewDevice for the offscreen */
  475.     gxViewGroup                        theViewGroup;                /* The viewGroup that they share */
  476.     gxShape                            theBitmap;                    /* The offscreen bitmap shape */
  477.     gxBitmap                        theBits;                    /* The bits of the offscreen */
  478. };
  479. typedef struct gxOffscreenPlaneRec gxOffscreenPlaneRec;
  480.  
  481. /* The format of an entire offscreen area */
  482. struct gxOffscreenRec {
  483.     short                            numberOfPlanes;                /* Number of planes we have */
  484.     Handle                            offscreenStorage;            /* Handle containing the bitmaps image data */
  485.     gxOffscreenPlaneRec                thePlanes[1];                /* Planes to draw in */
  486. };
  487. typedef struct gxOffscreenRec gxOffscreenRec, *gxOffscreenPtr, **gxOffscreenHdl;
  488.  
  489. typedef long gxRasterRenderOptions;
  490.  
  491. /* Structure that mirrors 'rdip' resource. */
  492. struct gxRasterPrefsRec {
  493.     gxRasterRenderOptions            renderOptions;                /* Options for the raster imaging system */
  494.     Fixed                            hImageRes;                    /* Horizontal resolution to image at */
  495.     Fixed                            vImageRes;                    /* Vertical resolution to image at */
  496.     short                            minBandSize;                /* Minimum band size to use (in pixels) */
  497.     short                            maxBandSize;                /* Maximum band size to use (in pixels), 0 == entire page */
  498.     Fixed                            ramPercentage;                /* Maximum percentage of RAM to take */
  499.     long                            ramSlop;                    /* Amount of RAM to be sure to leave */
  500.     short                            depth;                        /* Depth in pixels (PER PLANE!) */
  501.     short                            numPlanes;                    /* Number of planes to render */
  502.     gxPlaneSetupRec                    planeSetup[1];                /* One for each plane */
  503. };
  504. /* Constants for renderOptions field in gxRasterPrefsRec. */
  505.  
  506. enum {
  507.     gxDefaultRaster                = 0x00000000,                    /* Default raster options */
  508.     gxDontResolveTransferModes    = 0x00000001,                    /* 0=Resolve, 1=Don't Resolve */
  509.     gxRenderInReverse            = 0x00000002,                    /* Traverse image in reverse order */
  510.     gxOnePlaneAtATime            = 0x00000004,                    /* Render each plane separately */
  511.     gxSendAllBands                = 0x00000008                    /* Send even empty bands */
  512. };
  513.  
  514. typedef struct gxRasterPrefsRec gxRasterPrefsRec, *gxRasterPrefsPtr, **gxRasterPrefsHdl;
  515.  
  516. typedef long gxRasterPackageOptions;
  517.  
  518. /* Structure that mirrors 'rpck' resource. */
  519. struct gxRasterPackageRec {
  520.     Ptr                                bufferSize;                    /* Buffer size for packaging (>= maximum head pass size) */
  521.     short                            colorPasses;                /* 1 (b/w) or 4 (CMYK) is typical */
  522.     short                            headHeight;                    /* Printhead height in pixels */
  523.     short                            numberPasses;                /* Number of head passes it takes to == iHeadHeight */
  524.     short                            passOffset;                    /* Offset between passes, in pixels */
  525.     gxRasterPackageOptions            packageOptions;                /* Packaging options */
  526. };
  527. typedef struct gxRasterPackageRec gxRasterPackageRec, *gxRasterPackagePtr, **gxRasterPackageHdl;
  528.  
  529. /* Constants for packageOptions field in gxRasterPackageRec. */
  530.  
  531. enum {
  532.     gxSendAllColors                = 0x00000001,                    /* Send even clean bands through */
  533.     gxInterlaceColor            = 0x00000002,                    /* Ribbon contamination is a concern */
  534.     gxOverlayColor                = 0x00000004,                    /* Color printer without a ribbon problem */
  535.     gxUseColor                    = (gxInterlaceColor | gxOverlayColor) /* This is a color printer */
  536. };
  537.  
  538. /* Structure for RasterPackageBitmap message */
  539. struct gxRasterPackageBitmapRec {
  540.     gxBitmap                        *bitmapToPackage;            /* Bitmap containing the data to package */
  541.     unsigned short                    startRaster;                /* Raster to begin the packaging from */
  542.     unsigned short                    colorBand;                    /* For which color pass this is a packaging request */
  543.     Boolean                            isBandDirty;                /* Whether there are any dirty bits in this band */
  544.     char                            padByte;
  545.     Rect                            dirtyRect;                    /* Which bits are dirty */
  546. };
  547. typedef struct gxRasterPackageBitmapRec gxRasterPackageBitmapRec;
  548.  
  549. /* Structure of number record in gxRasterPackageControlsRec */
  550. struct gxStandardNumberRec {
  551.     short                            numberType;                    /* Type of numberic output desired */
  552.     short                            minWidth;                    /* Minimum output width of the number */
  553.     char                            padChar;                    /* Pad character for numbers shorter than the minWidth */
  554.     char                            padChar2;
  555.     Str31                            startString;                /* Prefix string */
  556.     Str31                            endString;                    /* Postfix string */
  557. };
  558. typedef struct gxStandardNumberRec gxStandardNumberRec, *gxStandardNumberPtr;
  559.  
  560. /* Structure that mirrors 'ropt' resource */
  561. struct gxRasterPackageControlsRec {
  562.     short                            startPageStringID;            /* 'wstr' to send to the device at start of page */
  563.     short                            formFeedStringID;            /* 'wstr' to send to the device to cause a form feed */
  564.     short                            forwardMax;                    /* Line feed strings */
  565.     gxStandardNumberRec                forwardLineFeed;            /* Number record for forward line feed */
  566.     short                            reverseMax;                    /* Max number of reverse line feeds device can do */
  567.     gxStandardNumberRec                reverseLineFeed;            /* Number record for forward line feed */
  568. };
  569. typedef struct gxRasterPackageControlsRec gxRasterPackageControlsRec, *gxRasterPackageControlsPtr, **gxRasterPackageControlsHdl;
  570.  
  571. /* Raster imaging system imageData structure */
  572. struct gxRasterImageDataRec {
  573.     gxRasterRenderOptions            renderOptions;                /* Options for the raster imaging system */
  574.     Fixed                            hImageRes;                    /* horizontal resolution to image at */
  575.     Fixed                            vImageRes;                    /* vertical resolution to image at */
  576.     short                            minBandSize;                /* smallest band that makes sense for this device */
  577.     short                            maxBandSize;                /* biggest band that makes sense, or 0 for "full page" */
  578.     gxRectangle                        pageSize;                    /* size of page for device */
  579. /*
  580.             Values used within the RasterDataIn message
  581.     */
  582.     short                            currentYPos;                /* Current position moving down the page */
  583.     gxRasterPackageRec                packagingInfo;                /* Raster packaging record */
  584. /*
  585.             Values used within the remaining messages
  586.     */
  587.     Boolean                            optionsValid;                /* Were options specified by the driver? */
  588.     char                            padByte;
  589.     gxRasterPackageControlsRec        packageControls;            /* Options for the packaging messages */
  590.     gxOffscreenSetupRec                theSetup;                    /* setup for the offscreen code, variable length componant */
  591. };
  592. typedef struct gxRasterImageDataRec gxRasterImageDataRec, *gxRasterImageDataPtr, **gxRasterImageDataHdl;
  593.  
  594. /* ------------------------------------------------------------------------------
  595.  
  596.                                 Raster Driver Imaging Messages
  597.  
  598. -------------------------------------------------------------------------------- */
  599. extern OSErr Send_GXRasterDataIn(gxOffscreenHdl offScreen, gxRectangle *bandRectangle, gxRectangle *dirtyRectangle)
  600.  FIVEWORDINLINE(0x7032, 0x223C, 0x0001, 0, 0xABFB);
  601. extern OSErr Forward_GXRasterDataIn(gxOffscreenHdl offScreen, gxRectangle *bandRectangle, gxRectangle *dirtyRectangle)
  602.  TWOWORDINLINE(0x7036, 0xABFB);
  603. extern OSErr Send_GXRasterLineFeed(long *lineFeedSize, Ptr buffer, unsigned long *bufferPos, gxRasterImageDataHdl imageDataHdl)
  604.  FIVEWORDINLINE(0x7032, 0x223C, 0x0001, 1, 0xABFB);
  605. extern OSErr Forward_GXRasterLineFeed(long *lineFeedSize, Ptr buffer, unsigned long *bufferPos, gxRasterImageDataHdl imageDataHdl)
  606.  TWOWORDINLINE(0x7036, 0xABFB);
  607. extern OSErr Send_GXRasterPackageBitmap(gxRasterPackageBitmapRec *whatToPackage, Ptr buffer, unsigned long *bufferPos, gxRasterImageDataHdl imageDataHdl)
  608.  FIVEWORDINLINE(0x7032, 0x223C, 0x0001, 2, 0xABFB);
  609. extern OSErr Forward_GXRasterPackageBitmap(gxRasterPackageBitmapRec *whatToPackage, Ptr buffer, unsigned long *bufferPos, gxRasterImageDataHdl imageDataHdl)
  610.  TWOWORDINLINE(0x7036, 0xABFB);
  611. /* ------------------------------------------------------------------------------
  612.  
  613.                         Vector Driver Contants and Types
  614.  
  615. -------------------------------------------------------------------------------- */
  616. /* Vector device halftone component record */
  617. struct gxVHalftoneCompRec {
  618.     Fixed                            angle;                        /* Angle to halftone at. Must be 0, 90, 45 or 135 */
  619.     long                            penIndex;                    /* index of the pen to draw this component with */
  620. };
  621. typedef struct gxVHalftoneCompRec gxVHalftoneCompRec;
  622.  
  623. /* Vector device halftone record */
  624. struct gxVHalftoneRec {
  625.     gxColorSpace                    halftoneSpace;
  626.     gxVHalftoneCompRec                halftoneComps[4];            /* Info for each color component */
  627.     long                            penIndexForBW;                /* Pen index to draw one bit deep or black and white bitmap with */
  628. };
  629. typedef struct gxVHalftoneRec gxVHalftoneRec;
  630.  
  631. /* Vector shape rendering information */
  632. typedef long gxVectorShapeOptions;
  633.  
  634. struct gxVectorShapeDataRec {
  635.     gxVectorShapeOptions            shapeOptions;                /* Options to control shape handling */
  636.     long                            maxPolyPoints;                /* Maximum number of polygon points that device can support */
  637.     Fixed                            shapeError;                    /* Defines allowed deviation from the original shape */
  638.     Fixed                            textSize;                    /* Text above this size is filled; text below this size is outlined */
  639.     Fixed                            frameSize;                    /* Frame's smaller than this -> shape stroked; frame's larger -> shape is filled */
  640. };
  641. typedef struct gxVectorShapeDataRec gxVectorShapeDataRec;
  642.  
  643. /* Constants for shapeOptions field in gxVectorShapeDataRec. */
  644.  
  645. enum {
  646.     gxUnidirectionalFill        = 0x00000001,                    /* Generate scanlines in one direction only.  Useful for transparencies */
  647.     gxAlsoOutlineFilledShape    = 0x00000002                    /* Turn on this bit to also outline solid filled shapes */
  648. };
  649.  
  650. /* Vector device rendering information */
  651. typedef long gxVectorRenderOptions;
  652.  
  653. /* Vector imaging system imageData structure */
  654. struct gxVectorImageDataRec {
  655.     gxVectorRenderOptions            renderOptions;                /* Options to control rendering: color sort, clipping, etc. */
  656.     Fixed                            devRes;                        /* Device resolution */
  657.     gxTransform                        devTransform;                /* Mapping, clip and halftoning information for colored bitmaps */
  658.     gxColorSet                        clrSet;                        /* Entire set of colors; usually indexed color space for pen plotters */
  659.     gxColor                            bgColor;                    /* The background color in the color space specified by the clrSpace field */
  660.     gxVHalftoneRec                    halftoneInfo;                /* Defines halftone information for color bitmaps */
  661.     gxPenTableHdl                    hPenTable;                    /* Complete list of pens along with their pen positions and thickness */
  662.     gxRectangle                        pageRect;                    /* Page dimensions */
  663.     gxVectorShapeDataRec            shapeData;                    /* Information on how to render a shape */
  664. };
  665. typedef struct gxVectorImageDataRec gxVectorImageDataRec, *gxVectorImageDataPtr, **gxVectorImageDataHdl;
  666.  
  667. /* Constants for renderOptions field in gxVectorImageDataRec. */
  668.  
  669. enum {
  670.     gxColorSort                    = 0x00000001,                    /* Set for pen plotters */
  671.     gxATransferMode                = 0x00000002,                    /* Set if transfer modes need to be resolved */
  672.     gxNoOverlap                    = 0x00000004,                    /* Set if non-overlapping output is desired*/
  673.     gxAColorBitmap                = 0x00000008,                    /* Set if color bitmap output is desired */
  674.     gxSortbyPenPos                = 0x00000010,                    /* Set if shapes are to be drawn in the order of the pen index */
  675. /* in the pen table. NOTE: this is not the pen position in the carousel */
  676.     gxPenLessPlotter            = 0x00000020,                    /* Indicates raster printer/plotter */
  677.     gxCutterPlotter                = 0x00000040,                    /* Indicates cutter */
  678.     gxNoBackGround                = 0x00000080                    /* Set if shapes that map to the background color should not be sent to driver */
  679. };
  680.  
  681. /* ------------------------------------------------------------------------------
  682.  
  683.                                 Vector Driver Imaging Messages
  684.  
  685. -------------------------------------------------------------------------------- */
  686. extern OSErr Send_GXVectorPackageShape(gxShape theShape, long penIndex)
  687.  FIVEWORDINLINE(0x7032, 0x223C, 0x0001, 0, 0xABFB);
  688. extern OSErr Forward_GXVectorPackageShape(gxShape theShape, long penIndex)
  689.  TWOWORDINLINE(0x7036, 0xABFB);
  690. extern OSErr Send_GXVectorLoadPens(gxPenTableHdl penTable, long *shapeCounts, Boolean *penTableChanged)
  691.  FIVEWORDINLINE(0x7032, 0x223C, 0x0001, 1, 0xABFB);
  692. extern OSErr Forward_GXVectorLoadPens(gxPenTableHdl penTable, long *shapeCounts, Boolean *penTableChanged)
  693.  TWOWORDINLINE(0x7036, 0xABFB);
  694. extern OSErr Send_GXVectorVectorizeShape(gxShape theShape, long penIndex, gxVectorShapeDataRec *vectorData)
  695.  FIVEWORDINLINE(0x7032, 0x223C, 0x0001, 2, 0xABFB);
  696. extern OSErr Forward_GXVectorVectorizeShape(gxShape theShape, long penIndex, gxVectorShapeDataRec *vectorData)
  697.  TWOWORDINLINE(0x7036, 0xABFB);
  698. /* ------------------------------------------------------------------------------
  699.  
  700.                             PostScript Driver Contants and Types
  701.  
  702. -------------------------------------------------------------------------------- */
  703.  
  704. enum {
  705.     gxPostSynonym                = (long)'post'
  706. };
  707.  
  708. /* PostScript glyphs record */
  709. struct gxPrinterGlyphsRec {
  710.     gxFont                            theFont;                    /*  ---> Font reference */
  711.     long                            nGlyphs;                    /*  ---> Number of glyphs in the font */
  712.     gxFontPlatform                    platform;                    /* <---  How printer font is encoded */
  713.     gxFontScript                    script;                        /* <---  Script if platform != glyphPlatform */
  714.     gxFontLanguage                    language;                    /* <---  Language if platform != glyphPlatform */
  715.     long                            vmUsage;                    /* <---  How much PostScript VM font uses */
  716. /* Size of this array is long-alligned(nGlyphs) */
  717.     unsigned long                    glyphBits[1];                /* <---  Bit array of which system glyphs are in printer */
  718. };
  719. typedef struct gxPrinterGlyphsRec gxPrinterGlyphsRec;
  720.  
  721. /* PostScript device rendering information */
  722. typedef long gxPostScriptRenderOptions;
  723.  
  724. struct gxPostScriptImageDataRec {
  725.     short                            languageLevel;                /* PostScript language level */
  726.     gxColorSpace                    devCSpace;                    /* The printer's color space */
  727.     gxColorProfile                    devCProfile;                /* The printer's color profile for matching */
  728.     gxPostScriptRenderOptions        renderOptions;                /* Options for the imaging system */
  729.     long                            pathLimit;                    /* Maximum path size */
  730.     short                            gsaveLimit;                    /* Maximum number of gsaves allowed */
  731.     short                            opStackLimit;                /* Operand stack limit */
  732.     scalerStreamTypeFlag            fontType;                    /* These are the font types that the printer supports  */
  733.     long                            printerVM;                    /* How much memory is in the printer */
  734.     long                            reserved0;
  735. };
  736. typedef struct gxPostScriptImageDataRec gxPostScriptImageDataRec, *gxPostScriptImageDataPtr, **gxPostScriptImageDataHdl;
  737.  
  738. /* Constants for renderOptions field in gxPostScriptImageDataRec. */
  739.  
  740. enum {
  741.     gxNeedsHexOption            = 0x00000001,                    /* Convert all binary data to hex */
  742.     gxNeedsCommentsOption        = 0x00000002,                    /* Issue PostScript comments */
  743.     gxBoundingBoxesOption        = 0x00000004,                    /* Calculate the values for %%BoundingBox: and %%PageBoundingBox: -- requires needsCommentsOption */
  744.     gxPortablePostScriptOption    = 0x00000008,                    /* Generate portable PostScript */
  745.     gxTextClipsToPathOption        = 0x00000010,                    /* Convert all clips that are composed of text to path shapes */
  746.     gxFlattenClipPathOption        = 0x00000020,                    /* Convert all clips that are path shapes to polygons (helps better control point limit) */
  747.     gxUseCharpath1Option        = 0x00000040,                    /* (ignored if text clips are converted to paths)  When the clip is text,  */
  748. /* Do it one glyph at a time, redrawing the main shape each time */
  749.     gxUseLevel2ColorOption        = 0x00000080,                    /* When printing to level-2 use level-2 device independent color */
  750.     gxNoEPSIllegalOperators        = 0x00000100,                    /* Don't use any operators prohibited by the Encapsulated PostScript File Format V3.0 */
  751.     gxEPSTargetOption            = gxNoEPSIllegalOperators + gxNeedsCommentsOption + gxBoundingBoxesOption /* PostScript intended for EPS Use. */
  752. };
  753.  
  754. /* Structure for gxPostScriptGetProcSetList / gxPostScriptDownLoadProcSetList */
  755. struct gxProcSetListRec {
  756.     gxOwnerSignature                clientid;
  757.     OSType                            controlType;                /* The driver will call FetchTaggedData on each of these resources */
  758.     short                            controlid;
  759.     OSType                            dataType;
  760.     long                            reserved0;
  761. };
  762. typedef struct gxProcSetListRec gxProcSetListRec, *gxProcSetListPtr, **gxProcSetListHdl;
  763.  
  764. /* Possible results of querying printer (returned by gxPostScriptQueryPrinter message) */
  765.  
  766. enum {
  767.     gxPrinterOK                    = 0,
  768.     gxIntializePrinter            = 1,
  769.     gxFilePrinting                = 2,
  770.     gxResetPrinter                = 128
  771. };
  772.  
  773. /* ------------------------------------------------------------------------------
  774.  
  775.                                 PostScript Driver Imaging Messages
  776.  
  777. -------------------------------------------------------------------------------- */
  778. extern OSErr Send_GXPostScriptQueryPrinter(long *queryData)
  779.  FIVEWORDINLINE(0x7032, 0x223C, 0x0001, 0, 0xABFB);
  780. extern OSErr Forward_GXPostScriptQueryPrinter(long *queryData)
  781.  TWOWORDINLINE(0x7036, 0xABFB);
  782. extern OSErr Send_GXPostScriptInitializePrinter(void)
  783.  FIVEWORDINLINE(0x7032, 0x223C, 0x0001, 1, 0xABFB);
  784. extern OSErr Forward_GXPostScriptInitializePrinter(void)
  785.  TWOWORDINLINE(0x7036, 0xABFB);
  786. extern OSErr Send_GXPostScriptResetPrinter(void)
  787.  FIVEWORDINLINE(0x7032, 0x223C, 0x0001, 2, 0xABFB);
  788. extern OSErr Forward_GXPostScriptResetPrinter(void)
  789.  TWOWORDINLINE(0x7036, 0xABFB);
  790. extern OSErr Send_GXPostScriptExitServer(void)
  791.  FIVEWORDINLINE(0x7032, 0x223C, 0x0001, 3, 0xABFB);
  792. extern OSErr Forward_GXPostScriptExitServer(void)
  793.  TWOWORDINLINE(0x7036, 0xABFB);
  794. /*
  795.  
  796.         Device communication messages
  797.  
  798. */
  799. extern OSErr Send_GXPostScriptGetStatusText(Handle textHdl)
  800.  FIVEWORDINLINE(0x7032, 0x223C, 0x0001, 4, 0xABFB);
  801. extern OSErr Forward_GXPostScriptGetStatusText(Handle textHdl)
  802.  TWOWORDINLINE(0x7036, 0xABFB);
  803. extern OSErr Send_GXPostScriptGetPrinterText(Handle textHdl)
  804.  FIVEWORDINLINE(0x7032, 0x223C, 0x0001, 5, 0xABFB);
  805. extern OSErr Forward_GXPostScriptGetPrinterText(Handle textHdl)
  806.  TWOWORDINLINE(0x7036, 0xABFB);
  807. extern OSErr Send_GXPostScriptScanStatusText(Handle textHdl)
  808.  FIVEWORDINLINE(0x7032, 0x223C, 0x0001, 6, 0xABFB);
  809. extern OSErr Forward_GXPostScriptScanStatusText(Handle textHdl)
  810.  TWOWORDINLINE(0x7036, 0xABFB);
  811. extern OSErr Send_GXPostScriptScanPrinterText(Handle textHdl)
  812.  FIVEWORDINLINE(0x7032, 0x223C, 0x0001, 7, 0xABFB);
  813. extern OSErr Forward_GXPostScriptScanPrinterText(Handle textHdl)
  814.  TWOWORDINLINE(0x7036, 0xABFB);
  815. /*
  816.  
  817.         Proc set management messages
  818.  
  819. */
  820. extern OSErr Send_GXPostScriptGetDocumentProcSetList(gxProcSetListHdl procSet, gxPostScriptImageDataHdl imageDataHdl)
  821.  FIVEWORDINLINE(0x7032, 0x223C, 0x0001, 8, 0xABFB);
  822. extern OSErr Forward_GXPostScriptGetDocumentProcSetList(gxProcSetListHdl procSet, gxPostScriptImageDataHdl imageDataHdl)
  823.  TWOWORDINLINE(0x7036, 0xABFB);
  824. extern OSErr Send_GXPostScriptDownloadProcSetList(gxProcSetListHdl procSet, gxPostScriptImageDataHdl imageDataHdl)
  825.  FIVEWORDINLINE(0x7032, 0x223C, 0x0001, 9, 0xABFB);
  826. extern OSErr Forward_GXPostScriptDownloadProcSetList(gxProcSetListHdl procSet, gxPostScriptImageDataHdl imageDataHdl)
  827.  TWOWORDINLINE(0x7036, 0xABFB);
  828. /*
  829.  
  830.         Font management messages
  831.  
  832. */
  833. extern OSErr Send_GXPostScriptGetPrinterGlyphsInformation(gxPrinterGlyphsRec *glyphsInfo)
  834.  FIVEWORDINLINE(0x7032, 0x223C, 0x0001, 10, 0xABFB);
  835. extern OSErr Forward_GXPostScriptGetPrinterGlyphsInformation(gxPrinterGlyphsRec *glyphsInfo)
  836.  TWOWORDINLINE(0x7036, 0xABFB);
  837. extern OSErr Send_GXPostScriptStreamFont(gxFont fontref, scalerStream *streamPtr)
  838.  FIVEWORDINLINE(0x7032, 0x223C, 0x0001, 11, 0xABFB);
  839. extern OSErr Forward_GXPostScriptStreamFont(gxFont fontref, scalerStream *streamPtr)
  840.  TWOWORDINLINE(0x7036, 0xABFB);
  841. /*
  842.  
  843.         Document structuring and formatting messages
  844.  
  845. */
  846. extern OSErr Send_GXPostScriptDoDocumentHeader(gxPostScriptImageDataHdl imageDataHdl)
  847.  FIVEWORDINLINE(0x7032, 0x223C, 0x0001, 12, 0xABFB);
  848. extern OSErr Forward_GXPostScriptDoDocumentHeader(gxPostScriptImageDataHdl imageDataHdl)
  849.  TWOWORDINLINE(0x7036, 0xABFB);
  850. extern OSErr Send_GXPostScriptDoDocumentSetup(gxPostScriptImageDataHdl imageDataHdl)
  851.  FIVEWORDINLINE(0x7032, 0x223C, 0x0001, 13, 0xABFB);
  852. extern OSErr Forward_GXPostScriptDoDocumentSetup(gxPostScriptImageDataHdl imageDataHdl)
  853.  TWOWORDINLINE(0x7036, 0xABFB);
  854. extern OSErr Send_GXPostScriptDoDocumentTrailer(gxPostScriptImageDataHdl imageDataHdl)
  855.  FIVEWORDINLINE(0x7032, 0x223C, 0x0001, 14, 0xABFB);
  856. extern OSErr Forward_GXPostScriptDoDocumentTrailer(gxPostScriptImageDataHdl imageDataHdl)
  857.  TWOWORDINLINE(0x7036, 0xABFB);
  858. /*
  859.  
  860.         Page structuring and formatting messages
  861.  
  862. */
  863. extern OSErr Send_GXPostScriptDoPageSetup(gxFormat pageFormat, long thePage, gxPostScriptImageDataHdl imageDataHdl)
  864.  FIVEWORDINLINE(0x7032, 0x223C, 0x0001, 15, 0xABFB);
  865. extern OSErr Forward_GXPostScriptDoPageSetup(gxFormat pageFormat, long thePage, gxPostScriptImageDataHdl imageDataHdl)
  866.  TWOWORDINLINE(0x7036, 0xABFB);
  867. extern OSErr Send_GXPostScriptSelectPaperType(gxPaperType thePapertype, long thePage, gxPostScriptImageDataHdl imageDataHdl)
  868.  FIVEWORDINLINE(0x7032, 0x223C, 0x0001, 16, 0xABFB);
  869. extern OSErr Forward_GXPostScriptSelectPaperType(gxPaperType thePapertype, long thePage, gxPostScriptImageDataHdl imageDataHdl)
  870.  TWOWORDINLINE(0x7036, 0xABFB);
  871. extern OSErr Send_GXPostScriptDoPageTrailer(gxPostScriptImageDataHdl imageDataHdl)
  872.  FIVEWORDINLINE(0x7032, 0x223C, 0x0001, 17, 0xABFB);
  873. extern OSErr Forward_GXPostScriptDoPageTrailer(gxPostScriptImageDataHdl imageDataHdl)
  874.  TWOWORDINLINE(0x7036, 0xABFB);
  875. extern OSErr Send_GXPostScriptEjectPage(gxPaperType thePapertype, long pagenumber, long copiescount, long erasepage, gxPostScriptImageDataHdl imageDataHdl)
  876.  FIVEWORDINLINE(0x7032, 0x223C, 0x0001, 18, 0xABFB);
  877. extern OSErr Forward_GXPostScriptEjectPage(gxPaperType thePapertype, long pagenumber, long copiescount, long erasepage, gxPostScriptImageDataHdl imageDataHdl)
  878.  TWOWORDINLINE(0x7036, 0xABFB);
  879. extern OSErr Send_GXPostScriptEjectPendingPage(Boolean *pageWasEjected)
  880.  FIVEWORDINLINE(0x7032, 0x223C, 0x0001, 20, 0xABFB);
  881. extern OSErr Forward_GXPostScriptEjectPendingPage(Boolean *pageWasEjected)
  882.  TWOWORDINLINE(0x7036, 0xABFB);
  883. /*
  884.  
  885.         Shape imaging messages
  886.  
  887. */
  888. extern OSErr Send_GXPostScriptProcessShape(gxShape page, long trcount, gxTransform trlist[])
  889.  FIVEWORDINLINE(0x7032, 0x223C, 0x0001, 19, 0xABFB);
  890. extern OSErr Forward_GXPostScriptProcessShape(gxShape page, long trcount, gxTransform trlist[])
  891.  TWOWORDINLINE(0x7036, 0xABFB);
  892. /* ------------------------------------------------------------------------------
  893.  
  894.                                             Driver API Functions
  895.  
  896. -------------------------------------------------------------------------------- */
  897.  
  898. enum {
  899.     gxMissingImagePointer        = -4
  900. };
  901.  
  902. extern OSErr GXAddPrinterViewDevice(gxPrinter thePrinter, gxViewDevice theViewDevice)
  903.  FOURWORDINLINE(0x203C, 0x0002, 0, 0xABFE);
  904. extern OSErr GXGetAvailableJobFormatModes(gxJobFormatModeTableHdl *theFormatModes)
  905.  FOURWORDINLINE(0x203C, 0x0002, 1, 0xABFE);
  906. extern OSErr GXSetPreferredJobFormatMode(gxJobFormatMode theFormatMode, Boolean directOnly)
  907.  FOURWORDINLINE(0x203C, 0x0002, 2, 0xABFE);
  908. extern OSErr GXPrintingAlert(long iconId, long txtSize, long defaultTitleNum, long cancelTitleNum, long textLength, Ptr pAlertMsg, StringPtr actionTitle, StringPtr title2, StringPtr title3, StringPtr msgFont, ModalFilterUPP filterProc, short *itemHit, StringPtr alertTitle)
  909.  FOURWORDINLINE(0x203C, 0x0002, 3, 0xABFE);
  910. extern OSErr GXGetPrintingAlert(long alertResId, ModalFilterUPP filterProc, short *itemHit)
  911.  FOURWORDINLINE(0x203C, 0x0002, 4, 0xABFE);
  912. extern OSErr GXFetchDTPData(Str31 dtpName, OSType theType, long theID, Handle *theData)
  913.  FOURWORDINLINE(0x203C, 0x0002, 5, 0xABFE);
  914. extern OSErr GXWriteDTPData(Str31 dtpName, OSType theType, long theID, Handle theData)
  915.  FOURWORDINLINE(0x203C, 0x0002, 6, 0xABFE);
  916. extern OSErr GXHandleChooserMessage(gxJob *aJob, Str31 driverName, long message, long caller, StringPtr objName, StringPtr zoneName, ListHandle theList, long p2)
  917.  FOURWORDINLINE(0x203C, 0x0002, 7, 0xABFE);
  918.  
  919. #if PRAGMA_IMPORT_SUPPORTED
  920. #pragma import off
  921. #endif
  922.  
  923. #if PRAGMA_ALIGN_SUPPORTED
  924. #pragma options align=reset
  925. #endif
  926.  
  927. #ifdef __cplusplus
  928. }
  929. #endif
  930.  
  931. #endif /* __GXPRINTERDRIVERS__ */
  932.